package com.jie.other.jetpack.observer

import android.util.Log
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner

class LifecycleStudyObserver : DefaultLifecycleObserver {

    override fun onStart(owner: LifecycleOwner) {
        super.onStart(owner)
        Log.i(TAG, "onStart: $TAG")
    }

    override fun onResume(owner: LifecycleOwner) {
        super.onResume(owner)
        Log.i(TAG, "onResume: $TAG")
    }

    override fun onPause(owner: LifecycleOwner) {
        Log.i(TAG, "onPause: $TAG")
    }

    companion object {
        private const val TAG = "LifecycleStudyObserver"
    }

}